package com.guapi.util;

import java.util.regex.Pattern;

/**
 * @author 瓜皮哦
 */
public interface BaseConstant {

    /**
     * 基本常量
     */
    String YES = "Y";

    String NO = "N";

    String ISENABLE = "0";

    String DISABLE = "1";

    String ISDELETABLE = "0";

    String ISLOCK = "0";

    String NULL = "NULL";

    String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";

    String DATE_FORMAT = "yyyy-MM-dd";

    String SPLIT = ":";

    String DOWN_LINE = "_";

    String SCHEDULE_PREFIX = "GUAPI-SCHEDULE-TASK-";

    int LIMIT_IN_TIMES = 150;
    /**
     * 正则-phone
     */
    Pattern PHONE_PHONE_REGEX = Pattern.compile("^1[3|4|5|8][0-9]\\d{4,8}");

    /**
     * 正则-email
     */
    Pattern PATTERN_EMAIL_REGEX = Pattern.compile("^([\\s\\S]*)+@([\\S\\s]*)+(\\.([\\S\\s]*)+)+$");

    /**
     * Jwt 签名
     */
    byte[] TOKEN_SIGNATURE = "LJL_ONLINE_SYSTEM_SIGNATURE_VERSION_1.0".getBytes();

    byte[] AES_KEY = "GUAPI_SEC_key_V_1_******".getBytes();

    /**
     * 默认过期时间
     */
    Long TOKEN_EXPIRE_DATE = 60L * 60L * 1000L * 2L;

    String REPLACE_REGEX_MAIL = "\\$\\{email}";

    String REPLACE_OURSITE = "${ourSite}";

    String REPLACE_CAPTCHA = "${captcha}";

    String REPLACE_LOCAL_ADDRESS = "${localAddress}";
}
